#include<stdio.h>
#define N 30
void triangle(int arr[][N], int a, int b)
{
	int i = 0;
	for (i = 0; i < a; i++)
	{
		int j = 0;
		arr[i][j] = 1;
		printf("%d ", arr[i][0]);
		for (j = 1; j <i+1; j++)
		{
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}
}
int main()
{
	int arr[N][N] = { 0 };
	int a = 7;
	int b = 7;
	triangle(arr, a, b);
	return 0;
}